package cn.com.cifi.service.impl;

import cn.com.cifi.dao.UserDao;
import cn.com.cifi.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

//Service层的Bean注解
@Service("userService")
public class UserServiceImpl implements UserService {
    //Resource使用对应Bean的id注入，而Autowired按Bean类型装配
    @Resource(name = "userDao")
    private UserDao userDao;

    public void save() {
        this.userDao.save();
        System.out.println("userService....save...");
    }
}
